import { TagNode } from '@/common/interface/node'

export interface GroupProps {
  model: any
  options: Record<string, unknown>[]
}
export interface ServiceProduct extends Partial<TagNode> {
  groupNumber: string
  name: string
  principal: GroupProps
  group: GroupProps
  settingLevel?: number
  members: any[]
  parentId?: any
}

export enum AllocationStrategy {
  ZERO = 'rrmemory',
  ONE = 'order',
  TWO = 'random',
  THREE = 'skill',
  FOUR = 'maxFreeTime',
  FIVE = 'leastAnswerTimes',
  SIX = 'longestAnswerTimes'
}

export interface QueueSetting extends GroupProps {
  time: number
  waitTime: number
  music: GroupProps
  times: number
}

export interface ServiceGroupState {
  isEdit: boolean
  callCenterRef?: any
  product: ServiceProduct
  activeIndex: string
  allocationStrategy: AllocationStrategy
  noFreeStaff: boolean
  maxNumQueue: number
  maxNumQueueTime: number
  longestRingTime: number
  ringUnDispatch: boolean
  broadcastJobNum: boolean
  forbiddenCall: boolean
  customizeMusic: boolean
  musicSetting: GroupProps
  queueTip: boolean
  queueSetting: QueueSetting
}
